]> dgit.raspbian.org Git - gnome-shell.git/commit
st/entry: Fix primary/secondary icon leak
authorSebastian Keller <skeller@gnome.org>
Sat, 28 Feb 2026 21:26:15 +0000 (22:26 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Mar 2026 17:39:38 +0000 (18:39 +0100)
commit1f7f4ca78ee5a5734fdf8257d8e379d4668042ac
treec723c8f10d0f862099150274a4acc30b1e5ea2ec
parentad701b958fef1b1513a23ebffdd783ebda75123e
st/entry: Fix primary/secondary icon leak

_st_entry_set_icon() takes a ref when setting the primary/secondary
icon, but the ref is not removed when unsetting the icon or the entry is
destroyed.

Since clutter_actor_add_child() already adds a ref to the icon, there is
actually no need to manually add another ref. So stop doing that to fix
this leak.

This however also requires that StPasswordEntry takes ownership of its
own icon that it may set or unset multiple times. Since it is initially
floating we need to sink the ref for that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4095>
(cherry picked from commit a3c6383d7428f951394a715341cd9ecac4172b7b)
src/st/st-entry.c
src/st/st-password-entry.c